-
Notifications
You must be signed in to change notification settings - Fork 2
feat(core): add c3 plus #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3e5e338 to
9554b92
Compare
LCOV of commit
|
5c5d557 to
2bd1349
Compare
5e09704 to
24c419a
Compare
34c32a8 to
9a3e432
Compare
|
Missing end line |
cff1020 to
7fc02ca
Compare
f60380e to
34dc923
Compare
4d79e9a to
af38053
Compare
|
Could you remind me why do we need extra constructor here? |
|
can this be merged into LCSFactory::GetNumContactVariables(const LCSFactoryOptions options)? |
|
is |
|
Previously, xuanhien070594 (Hien Bui) wrote…
I mean if we have both |
|
Same question, why do we need an extra constructor? |
|
Oh, I see the reason why you have a new constructor. You want to move contact pair information into |
|
Missing end line |
|
nit. There is no non-convex mesh in drake as it will automatically create convex hulls during URDF importing. |
|
This instruction is very helpful. |
|
You're calling |
|
int? |
|
Should it be |
|
should |
xuanhien070594
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xuanhien070594 reviewed 35 files and all commit messages, and resolved 3 discussions.
Reviewable status: all files reviewed, 13 unresolved discussions (waiting on @Meow404).
3e1d431 to
5a1c0b8
Compare
Meow404
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Meow404 made 11 comments.
Reviewable status: 30 of 35 files reviewed, 13 unresolved discussions (waiting on @xuanhien070594).
core/c3.cc line 96 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
You're calling
push_backtwice onz_sol_
Done.
core/c3_options.h line 38 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
int?
Done.
core/c3_plus.cc line 74 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
Should it be
N_instead ofN_ - 1?
my reasoning is since were using i and i+1, if use N, at the N - 1 we will weighted average N - 1 and N, which would be out of bouds for an array of size N.
examples/lcs_factory_system_example.cc line 312 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
Oh, I see the reason why you have a new constructor. You want to move contact pair information into
lcs_factory_optionsright? I think that's very clean approach. Can we safely remove the other constructor ofLCSFactory?
It's possible, but I kept it as is to not disturb current implementations too much and give people the flexibility to add contact pairs manually if they want (via code).
multibody/geom_geom_collider.h line 267 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
nit. There is no non-convex mesh in drake as it will automatically create convex hulls during URDF importing.
Ahh nice to know. I've removed the statement about non-convex meshes.
multibody/lcs_factory.h line 57 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
Could you remind me why do we need extra constructor here?
Done.
multibody/lcs_factory.cc line 600 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
can this be merged into LCSFactory::GetNumContactVariables(const LCSFactoryOptions options)?
I think LCSFactory::GetNumContactVariables(const LCSFactoryOptions options) covers a good number of usecases we have. I prefer keeping it gives the flexibility to the user to not having to generate an LCSFactoryOptions variable which contains much more information than what is required.
multibody/lcs_factory_options.h line 14 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
should
muhavedoubletype?
Done.
multibody/lcs_factory_options.h line 36 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
I mean if we have both
contact_pair_configsandmu, whichmushould we use?
contact_pair_configs are currently optional, and if provided, it will overwrite the mu provided in lcs_factory.
multibody/README.md line 1 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
This instruction is very helpful.
Done.
multibody/test/multibody_test.cc line 431 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
Missing end line
Done.
Meow404
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Meow404 made 1 comment.
Reviewable status: 30 of 35 files reviewed, 13 unresolved discussions (waiting on @xuanhien070594).
systems/lcs_factory_system.h line 36 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
Same question, why do we need an extra constructor?
as said above
|
My intention for using |
|
Previously, Meow404 (Thomas Stephen Felix) wrote…
Ah, I see. |
|
Previously, Meow404 (Thomas Stephen Felix) wrote…
Agree, I suggest adding some comments mentioning that new constructor should be preferred whenever possible. |
|
Previously, Meow404 (Thomas Stephen Felix) wrote…
Thanks for explanation. The implementation |
xuanhien070594
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xuanhien070594 reviewed 5 files and all commit messages, and resolved 11 discussions.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Meow404).
|
In PushAnything, the contact pairs are fixed, but we use a dedicated function to select the active contact pair online. For example, we initially define contact pairs between the end-effector and all objects, and during execution the controller selects the pair corresponding to the object closest to the end-effector. The list of contact pairs in PushAnything is long, so I think it is reasonable to still allow users to define contact pairs programmatically. |
Meow404
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Meow404 made 2 comments.
Reviewable status: 33 of 35 files reviewed, 2 unresolved discussions (waiting on @xuanhien070594).
examples/lcs_factory_system_example.cc line 312 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
Agree, I suggest adding some comments mentioning that new constructor should be preferred whenever possible.
Done.
multibody/lcs_factory.cc line 600 at r5 (raw file):
Previously, xuanhien070594 (Hien Bui) wrote…
Thanks for explanation. The implementation
int LCSFactory::GetNumContactVariables(ContactModel contact_model, int num_contacts, int num_friction_directions)can be simplified to reduce code duplication (generating a vector fromnum_friction_directionsthen call functionint LCSFactory::GetNumContactVariables(ContactModel contact_model, int num_contacts, std::vector<int> num_friction_directions_per_contact)
Done.
xuanhien070594
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the failed CI.
@xuanhien070594 reviewed 2 files and all commit messages, made 1 comment, and resolved 2 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @Meow404).
This change is